package com.leonzx.base.controller.theme;

import com.leonzx.base.controller.base.BaseController;
import com.leonzx.base.entity.system.User;
import com.leonzx.base.service.system.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:梁亮
 * @Description:
 * @Date: 2018/7/6 13:57
 */
@Controller
@RequestMapping("/theme")
public class ThemeController extends BaseController {

    private String prefix = "theme/";

    @Autowired
    private UserService userService;

    @RequestMapping("/edit")
    public String edit(Model model) {
        User user = userService.getUserById(currentUser().getId());
        model.addAttribute("user", user);
        return prefix + "edit";
    }
}
